/*
 * @Author: 陈俊升 761723995@qq.com
 * @Date: 2023-05-15 09:40:54
 * @LastEditors: 陈俊升 761723995@qq.com
 * @LastEditTime: 2024-01-24 14:13:18
 * @FilePath: /hr_new_vue3/src/apis/management/organization/organizationManagement/LegalEntity/index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/* 组织-法律实体api */
import { GetLegalEntityListType } from './type';
import { ajaxService } from '@/utils/request';
const env = import.meta.env;
const baseURL = env.VITE_DEV_BASE_URL;
// const baseURL = env.VITE_API_BASE_URL;
// const baseURL = 'http://192.168.31.129:39001';

// 获取法律实体列表
export function GetLegalEntityList(params: any) {
  return ajaxService({
    url: '/hr/organization/law/list',
    // url: '/management/law',
    method: 'get',
    params,
    baseURL
  });
}

// 新增法律实体
export function postLegalEntity(data: any) {
  return ajaxService({
    url: '/hr/organization/law/list',
    // url: '/management/law',
    method: 'post',
    data,
    baseURL
  });
}

// 编辑法律实体
export function putLegalEntity(data: any) {
  return ajaxService({
    url: '/hr/organization/law/list',
    // url: '/management/law',
    method: 'put',
    data,
    baseURL
  });
}

// 删除法律实体
export function delLegalEntity(data: any) {
  return ajaxService({
    url: '/hr/organization/law/list',
    // url: '/management/law',
    method: 'delete',
    data,
    baseURL
  });
}

// 新增修改法律实体校验
export function CheckLegalEntityList(params: any) {
  return ajaxService({
    url: '/hr/organization/law/list/repeat',
    // url: '/management/law/repeat',
    method: 'get',
    params,
    baseURL
  });
}
